<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins', function (Blueprint $table) {
            //管理员表
            $table->bigIncrements('id');
            $table->string('username',64)->nullable(false)->unique()->comment('账号');
            $table->string('nickname',200)->nullable(false)->comment('昵称');
            $table->string('password',128)->nullable(false)->comment('密码');
            $table->rememberToken();
            $table->boolean('status')->nullable(false)->default(true)->comment('状态1-启用0-禁用');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admins');
    }
}
